package com.wicket.okrframework.web.contorller;

import com.github.pagehelper.Page;
import com.wicket.okrframework.biz.service.OrgDictionaryService;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import com.wicket.okrframework.common.ro.OkrResult;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/base/orgDictionary/")
public class OrgDictionaryController {

    @Autowired
    OrgDictionaryService orgDictionaryService;

    /**
   * D1-3查组织架构类型字典列表
   */
    @PostMapping("queryOrgClassList")
    public OkrResult<QueryOrgClassListRespDto> queryOrgClassList(@RequestBody @Validated QueryOrgClassListReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        QueryOrgClassListRespDto retData = orgDictionaryService.queryOrgClassList(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);
    
    }

    /**
   * D1-3查组织架构类型字典（边界）
   */
    @PostMapping("queryOrgClassBorderDetail")
    public OkrResult<QueryOrgClassBorderDetailRespDto> queryOrgClassBorderDetail(@RequestBody @Validated QueryOrgClassBorderDetailReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryOrgClassBorderDetail(reqDTO));
    }

    /**
   * D1-3修改组织架构类型字典
   */
    @PostMapping("updateOrgClass")
    public OkrResult<UpdateOrgClassRespDto> updateOrgClass(@RequestBody @Validated UpdateOrgClassReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.updateOrgClass(reqDTO));
    }

    /**
   * D1-3新增组织架构类型字典
   */
    @PostMapping("addOrgClass")
    public OkrResult<AddOrgClassRespDto> addOrgClass(@RequestBody @Validated AddOrgClassReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.addOrgClass(reqDTO));
    }

    /**
   * D1-3查询可删除部门类型字典列表
   */
    @PostMapping("queryDeleteDeptClassList")
    public OkrResult<QueryDeleteDeptClassListRespDto> queryDeleteDeptClassList(@RequestBody @Validated QueryDeleteDeptClassListReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryDeleteDeptClassList(reqDTO));
    }

    /**
     * D1-3删除组织架构类型字典
     */
    @PostMapping("deleteOrgClass")
    public OkrResult<DeleteOrgClassRespDto> deleteOrgClass(@RequestBody @Validated DeleteOrgClassReqDto reqDTO) {
        return OkrResult.success(orgDictionaryService.deleteOrgClass(reqDTO));
    }
/**
   * D1-3查询组织架构字典边界详情(公共)(边界)
   */
    @PostMapping("queryOrgClassBorderDetailComBorder")
    public OkrResult<QueryOrgClassBorderDetailComBorderRespDto> queryOrgClassBorderDetailComBorder(@RequestBody @Validated QueryOrgClassBorderDetailComBorderReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryOrgClassBorderDetailComBorder(reqDTO));
    }
/**
   * D1-3查询部门类型字典(公共)
   */
    @PostMapping("queryDeptClassDetailCom")
    public OkrResult<QueryDeptClassDetailComRespDto> queryDeptClassDetailCom(@RequestBody @Validated QueryDeptClassDetailComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryDeptClassDetailCom(reqDTO));
    }
/**
   * D1-3查询部门类型字典列表(公共)
   */
    @PostMapping("queryDeptClassListCom")
    public OkrResult<QueryDeptClassListComRespDto> queryDeptClassListCom(@RequestBody @Validated QueryDeptClassListComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryDeptClassListCom(reqDTO));
    }
/**
   * D1查询工作任务来源列表
   */
    @PostMapping("queryWorkTaskSourceList")
    public OkrResult<QueryWorkTaskSourceListRespDto> queryWorkTaskSourceList(@RequestBody @Validated QueryWorkTaskSourceListReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryWorkTaskSourceList(reqDTO));
    }
/**
   * D1分析部门业务身份(公共)
   */
    @PostMapping("analysisDeptBusinessIdentityCom")
    public OkrResult<AnalysisDeptBusinessIdentityComRespDto> analysisDeptBusinessIdentityCom(@RequestBody @Validated AnalysisDeptBusinessIdentityComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.analysisDeptBusinessIdentityCom(reqDTO));
    }
/**
   * D1获取部门业务身份(公共)
   */
    @PostMapping("obtainDeptBusinessIdentityCom")
    public OkrResult<ObtainDeptBusinessIdentityComRespDto> obtainDeptBusinessIdentityCom(@RequestBody @Validated ObtainDeptBusinessIdentityComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.obtainDeptBusinessIdentityCom(reqDTO));
    }
/**
   * D1查询UCD筛选工作任务来源列表
   */
    @PostMapping("queryUcdWorkTaskSourceList")
    public OkrResult<QueryUcdWorkTaskSourceListRespDto> queryUcdWorkTaskSourceList(@RequestBody @Validated QueryUcdWorkTaskSourceListReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryUcdWorkTaskSourceList(reqDTO));
    }
/**
   * D1查询工作任务来源详情(公共)
   */
    @PostMapping("queryWorkTaskSourceDetailCom")
    public OkrResult<QueryWorkTaskSourceDetailComRespDto> queryWorkTaskSourceDetailCom(@RequestBody @Validated QueryWorkTaskSourceDetailComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryWorkTaskSourceDetailCom(reqDTO));
    }
/**
   * D1新增工作任务来源数据（内存）(公共)
   */
    @PostMapping("addWorkTaskSourceDataStorageCom")
    public OkrResult<AddWorkTaskSourceDataStorageComRespDto> addWorkTaskSourceDataStorageCom(@RequestBody @Validated AddWorkTaskSourceDataStorageComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.addWorkTaskSourceDataStorageCom(reqDTO));
    }
/**
   * D1查询工作任务来源匹配部门业务身份列表
   */
    @PostMapping("queryWorkTaskSourceMateDeptBusinessIdentityList")
    public OkrResult<QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto> queryWorkTaskSourceMateDeptBusinessIdentityList(@RequestBody @Validated QueryWorkTaskSourceMateDeptBusinessIdentityListReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryWorkTaskSourceMateDeptBusinessIdentityList(reqDTO));
    }
/**
   * D1新增任务分类(公共)
   */
    @PostMapping("addTaskCategoriesCom")
    public OkrResult<AddTaskCategoriesComRespDto> addTaskCategoriesCom(@RequestBody @Validated AddTaskCategoriesComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.addTaskCategoriesCom(reqDTO));
    }
/**
   * D1新增任务分类业务处理
   */
    @PostMapping("addTaskCategoriesBusinessHandle")
    public OkrResult<AddTaskCategoriesBusinessHandleRespDto> addTaskCategoriesBusinessHandle(@RequestBody @Validated AddTaskCategoriesBusinessHandleReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.addTaskCategoriesBusinessHandle(reqDTO));
    }
/**
   * D1分析任务分类树code值(公共)
   */
    @PostMapping("analysisTaskCategoriesTreeCodeCom")
    public OkrResult<AnalysisTaskCategoriesTreeCodeComRespDto> analysisTaskCategoriesTreeCodeCom(@RequestBody @Validated AnalysisTaskCategoriesTreeCodeComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.analysisTaskCategoriesTreeCodeCom(reqDTO));
    }
/**
   * D1查询任务分类列表(公共)
   */
    @PostMapping("queryTaskCategoriesListCom")
    public OkrResult<QueryTaskCategoriesListComRespDto> queryTaskCategoriesListCom(@RequestBody @Validated QueryTaskCategoriesListComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryTaskCategoriesListCom(reqDTO));
    }
/**
   * D1查询任务分类详情(公共)
   */
    @PostMapping("queryTaskCategoriesDetailCom")
    public OkrResult<QueryTaskCategoriesDetailComRespDto> queryTaskCategoriesDetailCom(@RequestBody @Validated QueryTaskCategoriesDetailComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryTaskCategoriesDetailCom(reqDTO));
    }
/**
   * D1存档任务分类业务处理
   */
    @PostMapping("archiveTaskCategoriesBusinessHandle")
    public OkrResult<ArchiveTaskCategoriesBusinessHandleRespDto> archiveTaskCategoriesBusinessHandle(@RequestBody @Validated ArchiveTaskCategoriesBusinessHandleReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.archiveTaskCategoriesBusinessHandle(reqDTO));
    }
/**
   * D1修改任务分类(公共)
   */
    @PostMapping("updateTaskCategoriesCom")
    public OkrResult<UpdateTaskCategoriesComRespDto> updateTaskCategoriesCom(@RequestBody @Validated UpdateTaskCategoriesComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.updateTaskCategoriesCom(reqDTO));
    }
/**
   * D1删除任务分类业务处理
   */
    @PostMapping("deleteTaskCategoriesBusinessHandle")
    public OkrResult<DeleteTaskCategoriesBusinessHandleRespDto> deleteTaskCategoriesBusinessHandle(@RequestBody @Validated DeleteTaskCategoriesBusinessHandleReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.deleteTaskCategoriesBusinessHandle(reqDTO));
    }
/**
   * D1删除任务分类(公共)
   */
    @PostMapping("deleteTaskCategoriesCom")
    public OkrResult<DeleteTaskCategoriesComRespDto> deleteTaskCategoriesCom(@RequestBody @Validated DeleteTaskCategoriesComReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.deleteTaskCategoriesCom(reqDTO));
    }
/**
   * D1修改任务分类业务处理
   */
    @PostMapping("updateTaskCategoriesBusinessHandle")
    public OkrResult<UpdateTaskCategoriesBusinessHandleRespDto> updateTaskCategoriesBusinessHandle(@RequestBody @Validated UpdateTaskCategoriesBusinessHandleReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.updateTaskCategoriesBusinessHandle(reqDTO));
    }
/**
   * D1查询任务分类主题列表
   */
    @PostMapping("queryTaskCategoriesThemeList")
    public OkrResult<QueryTaskCategoriesThemeListRespDto> queryTaskCategoriesThemeList(@RequestBody @Validated QueryTaskCategoriesThemeListReqDto reqDTO){
    return OkrResult.success(orgDictionaryService.queryTaskCategoriesThemeList(reqDTO));
    }
}
